/*
 * @Date: 2024-03-12 14:15:13
 * @Autor: 叶世超
 * @LastEditors: 叶世超 yesc163@163.com
 * @LastEditTime: 2024-05-16 14:06:51
 * @FilePath: \reslib-web\src\api\knowledge\extraction\index.ts
 * @Description: 描述
 * @version: 版本
 */
import request from '@/config/axios'
/* 实体提取 */

// 实体识别
export const plo = async (params) => {
  return await request.get({ url: '/knowledgeGraph/plo/' + '?text=' + params })
}
// 事件抽取
export const qk = async (params) => {
  return await request.get({ url: '/knowledgeGraph/qk/' + '?text=' + params })
}
// 关系抽取
export const rdf = async (params) => {
  return await request.get({ url: '/knowledgeGraph/rdf/' + '?text=' + params })
}

// 实体识别-提交
export const insertGraphEntityByList = async (params) => {
  return await request.post({ url: '/knowledgeGraph/insertGraphEntityByList', data: params })
}
// 关系抽取-提交
export const insertNeo4j = async (params) => {
  return await request.post({ url: '/knowledgeGraph/insertNeo4j', data: params })
}
// 事件图谱单独接口，不走entityType字段切换
// 分页接口
export const getGraphEventPage = async (params) => {
  return await request.get({ url: '/knowledgeGraph/getGraphEventPage', params })
}
// 新增
export const insertHybaseGraphEvent = async (params) => {
  return await request.post({ url: '/knowledgeGraph/insertHybaseGraphEvent', data: params })
}
// 修改
export const updateHybaseGraphEvent = async (params) => {
  return await request.post({ url: '/knowledgeGraph/updateHybaseGraphEvent', data: params })
}
// 根据ID查询
export const getGraphEventById = async (params) => {
  return await request.get({ url: '/knowledgeGraph/getGraphEventById', params })
}
// 删除实体
export const deleteHybaseGraphEvent = async (params) => {
  return await request.get({ url: '/knowledgeGraph/deleteHybaseGraphEvent' + '?ids=' + params })
}
